package com.example.mybatisdemo.mapper;


import com.example.mybatisdemo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {
    @Select("select ta.id,ta.title,ta.content,ta.uid,tb.username,tb.age,tb.gender " +
            "from " +
            "articleinfo ta " +
            "left join user_info tb on ta.uid = tb.id " +
            "where " +
            "ta.id = #{id}")
    ArticleInfo queryUserByUid(Integer id);
}
